Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entry resource #95

Merged
merged 2 commits into from
Aug 18, 2020
Merged

Entry resource #95

merged 2 commits into from
Aug 18, 2020

Conversation

jmwilliams89
Copy link
Contributor

@jmwilliams89 jmwilliams89 commented Aug 18, 2020

Description of Changes

Added

  • The Resource field was added to Entry
  • The Identifier helper was created to assist with writing to Resource

Removed

  • The Tags field was removed from Entry

Changed

  • The host_metadata operator now writes to an entry's Resource field, instead of Labels
  • The host_labeler helper has been renamed host_identifier
  • The metadata operator embeds the Identifier helper and supports writing to Resource
  • Input operators embed the Identifier helper and support writing to Resource
  • The k8s_event operator now supports the write_to, labels, and resource configuration options

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Add a changelog entry (for non-trivial bug fixes / features)
  • CI passes

@djaglowski
Copy link
Member

Log Files Logs / Second CPU Avg (%) CPU Avg Δ (%) Memory Avg (MB) Memory Avg Δ (MB)
1 1000 3.1897488 -0.1207757 31.41083 -0.5198002
1 5000 9.258871 +1.0517874 42.532463 +1.3224678
1 10000 14.086502 -0.20686722 54.14103 -0.48666382
1 50000 61.595093 -1.0957451 188.1848 -1.5977936
1 100000 120.60054 -1.490654 270.10117 -18.858154
10 100 5.189753 +0.534472 28.694235 -1.9769669
10 500 10.586434 -0.8104143 39.79149 -2.4698257
10 1000 17.94868 +0.06894302 52.88187 -0.70783997
10 5000 70.03612 +0.41397858 171.66487 -28.097244
10 10000 131.77617 -1.1747589 298.10022 -16.164337

@codecov
Copy link

codecov bot commented Aug 18, 2020

Codecov Report

Merging #95 into master will decrease coverage by 0.11%.
The diff coverage is 60.53%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #95      +/-   ##
==========================================
- Coverage   73.40%   73.30%   -0.11%     
==========================================
  Files          69       70       +1     
  Lines        4211     4254      +43     
==========================================
+ Hits         3091     3118      +27     
- Misses        855      864       +9     
- Partials      265      272       +7     
Impacted Files Coverage Δ
operator/builtin/transformer/host_metadata.go 4.55% <0.00%> (ø)
operator/builtin/transformer/metadata.go 66.67% <33.33%> (-8.33%) ⬇️
operator/builtin/input/k8s_events.go 43.68% <50.00%> (-2.75%) ⬇️
operator/helper/input.go 78.95% <54.55%> (-8.15%) ⬇️
operator/helper/host_identifier.go 30.19% <57.14%> (ø)
operator/helper/identifier.go 82.61% <82.61%> (ø)
entry/entry.go 93.18% <100.00%> (+0.32%) ⬆️
operator/helper/expr_string.go 87.88% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa6f8e1...0b87640. Read the comment docs.

}

entry.Timestamp = typedEvent.LastTimestamp.Time
entry.AddLabel("event_type", string(event.Type))
k.Write(ctx, entry)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not seeing any change that would affect write_to. Could you explain what changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you use NewEntry, it uses the write_to field when constructing the entry.

@jmwilliams89 jmwilliams89 merged commit 0a0c521 into master Aug 18, 2020
@jmwilliams89 jmwilliams89 deleted the entry-resource branch August 18, 2020 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants